package cn.itcast.service.impl;

import cn.itcast.dao.MobileAddressDao;
import cn.itcast.pojo.Address;
import cn.itcast.service.MobileAddressService;
import com.alibaba.dubbo.config.annotation.Service;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
@Slf4j
public class MobileAddressServiceImpl implements MobileAddressService {
    @Autowired
    private MobileAddressDao mobileAddressDao;
    /**
     * 查询所有分院地址列表
     * @return
     */
    @Override
    public List<Address> findAllAddress() {
        return this.mobileAddressDao.findAllAddress();
    }

    /**
     * 根据地址id查询地址信息
     * @param addressId
     * @return
     */
    @Override
    public Address findAddressById(Integer addressId) {
        return this.mobileAddressDao.findAddressById(addressId);
    }
}
